/********************************************************/
/*	Author:		gong_libin			*/
/*	Date:		2017_11_01			*/
/*	File:		CmAdmin.h			*/
/********************************************************/

#ifndef	_CMADMIN_H
#define	_CMADMIN_H

#include "CmUtil.h"
#include "CmTrans.h"
#include "CmThread.h"
#include "CmConfig.h"

#define	CM_ADM_SLEEP			30

class CCmAdmin : public CmCls::CCmThread
{
public:
	CCmAdmin(CMMAP_C& rCMapper) : m_rCMapper(rCMapper) {m_ppCTrans = (CCmTrans**)CmMalloc(sizeof(CCmTrans*) * m_rCMapper.CmMapSize());};
	CCmAdmin(CMMAP_C& rCMapper, CCmTrans*** pppCTrans) : m_rCMapper(rCMapper) {*pppCTrans = m_ppCTrans = (CCmTrans**)CmMalloc(sizeof(CCmTrans*) * m_rCMapper.CmMapSize());};
	virtual ~CCmAdmin() {CmFree((void**)m_ppCTrans);};

	virtual void CmThreadCore();

	void CmAdminLoad();
	void CmAdminPrint();

protected:

private:
	CMMAP_C&	m_rCMapper;
	CCmTrans**	m_ppCTrans;

};

#endif /* _CMADMIN_H */
